﻿module lang.d.sts.statements.dreturnstatement;

import lang.d.sts.statements.dstatement;
import lang.d.sts.expressions.dexpression;
import lang.d.visitors.dvisitor;

class DReturnStatement: DStatement {
    private DExpression myExpression;

    public this(DExpression expr) {
        if (expr !is null) {
            myExpression = expr;
            expr.setParent(this);
        }
    }

    public DExpression getExpression() {
        return myExpression;
    }

    override public void accept(DVisitor visitor) {
        visitor.visitReturnStatement(this);
    }
}